#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    QTimer *timer = new QTimer(this);
    time = new QTime();
    timer = new QTimer();
    connect(timer, SIGNAL(timeout()) , this, SLOT(showTime()));
    timer->start();
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::showTime()
{
    *time = QTime::currentTime();
    string = time->toString();
    ui->label->setText(string);
}
